package com.freshcity.page.common
{
	import com.freshcity.component.container.Component;
	
	import flash.display.DisplayObjectContainer;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;
	
	public class HelpIcon extends Component
	{
		private var desc:String;
		private var tipdata:String;
		
		public function HelpIcon(desc:String,tipdata:String,parent:DisplayObjectContainer=null, xpos:Number=0, ypos:Number=0)
		{
			this.desc = desc;
			this.tipdata = tipdata;
			super(parent, xpos, ypos);
		}
		
		override protected function addChildren():void
		{
			super.addChildren();
			var tf:TextField = new TextField();
			tf.autoSize = TextFieldAutoSize.LEFT;
			
			var format:TextFormat = new TextFormat("宋体",12,0x0033cc);
			tf.defaultTextFormat = format;
			tf.htmlText = desc;
			addChild(tf);
			
			this.toolTipData=tipdata;
		}
		
		
	}
}